//
//  CameraRecorder.h
//  舞媚娘
//
//  Created by 陈超 on 16/8/9.
//  Copyright © 2016年 陈超. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <AVFoundation/AVFoundation.h>
#import <UIKit/UIKit.h>
#import "CameraTransformModel.h"
#import "BorderModel.h"
typedef void (^UserDeniedAuthorizationBlock)();
@protocol RecordFinshedDelegate <NSObject>
-(void)RecordFinshed:(NSURL *)outPutVideoUrl error:(NSError*)error;
@end
@interface CameraRecorder : NSObject<AVCaptureVideoDataOutputSampleBufferDelegate,AVCaptureAudioDataOutputSampleBufferDelegate>
@property (assign, nonatomic) BOOL isCapturing;

@property(assign,nonatomic)BOOL captureAudio;
@property(strong,nonatomic)CameraTransformModel *tranformModel;
@property(strong,nonatomic)BorderModel *borderModel;


-(void)switchCamera;
-(void)changeTransform;
-(void)stopRecord;
-(void)pauseRecord;
-(void)stopAnimation;
-(void)startAnimation;
-(void)startRecord;
-(void)updateBorder;
-(void)resetPreViewToPartNum;
-(void)setFlashEnable:(BOOL)value;
- (void)changeBrightNess:(float)value;
-(BOOL)isFlashOn;
-(float)getBrightNess;
-(float)getMinBrightNess;
-(float)getMaxBrightNess;
-(void)setPreSet:(NSString *)preset;
-(void)setFocusMode:(AVCaptureFocusMode)focusMode;
-(BOOL)isSupportPreset:(NSString *)preset;
-(instancetype)initWithParams:(UIView *)superView delegate:(id<RecordFinshedDelegate>)delegate userDeniedAuthorizationBlock:(UserDeniedAuthorizationBlock)userDeniedAuthorizationBlock;
@end
